package vg.services.data_base_manager.data.header;

public class GraphModelHeader implements Cloneable {
	// Main data
	public final int id;
	public String name;
	public int root_id;
	
	public GraphModelHeader(int id) {
		this.id = id;
		this.name = null;
		this.root_id = -1;
	}
	
	public GraphModelHeader(int id, int root_id, String name) {
		this.id = id;
		this.name = name;
		this.root_id = root_id;
	}
	
	@Override
	public GraphModelHeader clone() {
		return new GraphModelHeader(id, root_id, name);
	}
	
	@Override
	public int hashCode() {
		return id;
	}
	
	@Override
	public boolean equals(Object o) {
		if (o == null) return false;
		
		if (o instanceof GraphModelHeader && ((GraphModelHeader)o).id == id) return true;
		
		return false;
	}
}
